import {bannerList} from '../../../request/api'

const state = {
    bannerlist:[]
}

const getters = {
    getBanner(state){
        return state.bannerlist
    }
}

const mutations = {
    GETBANNER(state,payload){
        state.bannerlist = payload
    }
}

const actions = {
    getBannerListactions({commit}){
        bannerList().then(res => {
            if(res.code == 200){
                commit('GETBANNER',res.list)
            }
        })
    }
}

export default { 
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}